-
Notifications
You must be signed in to change notification settings - Fork 2
[DT-2757] Ensure institutional Certification files are saved on appropriate dataset updates #2771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DT-2757] Ensure institutional Certification files are saved on appropriate dataset updates #2771
Conversation
| throws IOException { | ||
| List<FileStorageObject> updateDatasetFSOs = new ArrayList<>(); | ||
|
|
||
| if (files.containsKey(String.format(NIH_INSTITUTIONAL_CERTIFICATION_NAME, 0))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the core of the bug. When multiple datasets are updated, we can have multiple files submitted. Assuming the files key was always consentGroups[**0**].nihInstitutionalCertificationFile is incorrect. The update payload might be just a change for consentGroup[5], or a case where multiple consentGroup entries are updated at the same time.
Given this bug I've made https://broadworkbench.atlassian.net/browse/DT-2759
|
| datasetUpdate.dacId, | ||
| datasetUpdate.props, | ||
| studyUpdate.files, | ||
| datasetUpdate.files, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing the studyUpdate files into the dataset updates (and inserts ~L271) was also problematic. The files would be uploaded to GCS but the FSOs wouldn't be recorded.
rushtong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find 👍🏽



Addresses
https://broadworkbench.atlassian.net/browse/DT-2757
Summary
Updates to documents were only being saved for the first dataset on a study.
Have you read CONTRIBUTING.md lately? If not, do that first.